<input type="hidden" value="${ctx}" id="basePath">

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>自主命题</title>

    <link href="${ctx}/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="${ctx}/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="${ctx}/css/animate.min.css" rel="stylesheet">
    <link href="${ctx}/css/style.min862f.css?v=4.1.0" rel="stylesheet">
    <!--单选框样式-->
    <link href="${ctx}/css/labelauty.css" rel="stylesheet"/>

    <script src="${ctx}/js/jquery.min.js?v=2.1.4"></script>
    <script src="${ctx}/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="${ctx}/js/content.min.js?v=1.0.0"></script>
    <!--<script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>-->
    <script src="${ctx}/js/plugins/layer/layer.js"></script>
    <script src="${ctx}/js/template.js"></script>
    <!--单选框js-->
    <script src="${ctx}/js/labelauty.js"></script>
    <script src="${ctx}/js/exam/exam-add.js"></script>
    <#--表单验证-->
    <link href="${ctx}/parsley/parsley.css" rel="stylesheet">
    <script src="${ctx}/parsley/parsley.min.js"></script>
    <style type="text/css">
        .check-image {
            background: url(${ctx}/images/input-unchecked.png) no-repeat;
        }

        /**********************************自定义单选框样式******************************************/
        .rdo {
            min-height: 34px;
            border: 1px solid #e5e6e7;
        }

        .rdobox {
            border-radius: 0;
            height: 34px;
        }

        /**********************************自定义单选框样式******************************************/

        label {
            margin-bottom: 0px;
        }

        .control-label {
            padding-right: 0;
        }

        .waring {
            position: fixed;
            top: 18%;
            right: 12%;
            min-height: 80px;
            width: 15%;
        }

        /*去圆角*/
        .nav-tabs li a {
            border-radius: 0 0 0 0;
        }

    </style>
<#--表单验证，显示错误信息-->
    <style type="text/css">
        input.error {
            background: rgb(251, 227, 228);
            border: 1px solid #fbc2c4;
            color: red;
        }

        label.error {
            color: red;
            display: inline-block;
        }

        /*提示框高度*/
        ul.notes li div {
            min-height: 319px;
        }
    </style>
</head>
<body class="gray-bg" onload="getTime()">
<br>
<div class="wrapper wrapper-content animated fadeInUp waring">
    <ul class="notes">
        <li>
            <div style="transform:rotate(0deg);">
                <small id="date-time" style="text-align: left;width: 92%"></small>
                <br>
                <h4>温馨提示</h4>
                <p><span class="glyphicon glyphicon-triangle-right" style="color: limegreen"></span>命题前，请先进行试题参数设置，系统默认最大值为10。
                </p>
                <p><span class="glyphicon glyphicon-triangle-right" style="color: limegreen"></span>试题题干不可与已存在的试题题干相同，系统将会对此进行验证。
                </p>
                <p><span class="glyphicon glyphicon-triangle-right" style="color: limegreen"></span>需要增加定位、主治或者答案项时，请点击添加按钮。
                </p>
                <p><span class="glyphicon glyphicon-triangle-right" style="color: limegreen"></span>需要减少答案或者主治项时，请点击“叉号”进行删除。
                </p>
                <p><span class="glyphicon glyphicon-triangle-right" style="color: limegreen"></span>切换分类后，请点击重置按钮，清空上次填写内容。
                </p>
            </div>
        </li>
    </ul>
</div>
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="tabbable" id="tabs-576364">
                <ul class="nav nav-tabs">
                    <li class="active"><a href="#panel-1" data-toggle="tab">问答题</a></li>
                    <li><a href="#panel-2" data-toggle="tab">穴位定位</a></li>
                    <li><a href="#panel-3" data-toggle="tab">单项手法</a></li>
                    <li><a href="#panel-4" data-toggle="tab">成套手法</a></li>
                </ul>
                <br/>
                <div class="tab-content">
                    <!--------------------------------------------------------------------问答------------------------------------------------------------------------->
                    <div class="tab-pane active" id="panel-1">
                        <form class="form-horizontal" id="form-wenda">
                            <div class="col-md-9">
                                <!--试题分类-->
                                <div class="form-group">
                                    <label class="col-md-2 control-label">分类</label>
                                    <div class="col-md-9">
                                        <div class="rdo">
                                            <!--腧穴题-->
                                            <input type="radio" name="categoryId" class="rdolist" value="1"
                                                   checked="checked"/>
                                            <label class="rdobox" radio-exam-category-val="1">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">腧穴</span>
                                            </label>
                                            <!--伤科-->
                                            <input type="radio" name="categoryId" class="rdolist" value="3"/>
                                            <label class="rdobox" radio-exam-category-val="3">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">伤科</span>
                                            </label>
                                            <!--内科-->
                                            <input type="radio" name="categoryId" class="rdolist" value="2"/>
                                            <label class="rdobox" radio-exam-category-val="2">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">内科</span>
                                            </label>
                                            <!--妇科-->
                                            <input type="radio" name="categoryId" class="rdolist" value="4"/>
                                            <label class="rdobox" radio-exam-category-val="4">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">妇科</span>
                                            </label>
                                            <!--儿科-->
                                            <input type="radio" name="categoryId" class="rdolist" value="5"/>
                                            <label class="rdobox" radio-exam-category-val="5">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">儿科</span>
                                            </label>
                                            <!--触诊-->
                                            <input type="radio" name="categoryId" class="rdolist" value="6"/>
                                            <label class="rdobox" radio-exam-category-val="6">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">触诊</span>
                                            </label>
                                        </div>
                                    </div>
                                </div>
                                <!--题干-->
                                <div class="form-group">
                                    <label class="col-md-2 control-label">题干</label>
                                    <div class="col-md-9 ">
                                        <input type="text" name="stem" class="form-control" parsley-trigger="change"
                                               required maxlength="250" data-parsley-maxlength="250" placeholder="请输入题干......" />
                                    </div>
                                </div>
                                <!--知识点、总分-->
                                <div class="form-group">
                                    <label class="col-md-2 control-label">知识点</label>
                                    <div class="col-md-4 ">
                                        <input type="text" class="form-control" name="knowledgePoint"
                                               parsley-trigger="change" required maxlength="250"
                                               data-parsley-maxlength="250" placeholder="请输入知识点......"/>
                                    </div>
                                    <label class="col-md-1 control-label">总分</label>
                                    <div class="col-md-4 ">
                                        <input type="text" name="totalScore" class="form-control" readonly
                                               placeholder="总分自动计算" id="total-score-wenda"/>
                                    </div>
                                </div>
                                <!--大纲代码、认知层次-->
                                <div class="form-group">
                                    <label class="col-md-2 control-label">大纲代码</label>
                                    <div class="col-md-4 ">
                                        <input type="text" class="form-control" name="outlineCode"
                                               parsley-trigger="change" required maxlength="30"
                                               data-parsley-maxlength="30" placeholder="请输入大纲代码......"/>
                                    </div>

                                    <label class="col-md-1 control-label" style="padding-left:0;">认知层次</label>
                                    <div class="col-md-4">
                                        <select name="cognitiveLevel" class="form-control" parsley-trigger="change"
                                                required>
                                            <option value="">请选择</option>
                                        <#list cognitiveLevelList as listKey>
                                            <option value="${listKey.name}">${listKey.name}</option>
                                        </#list>
                                        </select>
                                    </div>
                                </div>
                                <!--问答题答案模板-->
                                <div id="answer-content-wenda"></div>
                                <div class="form-group">
                                    <div class="col-md-6" style="text-align: center;">
                                        <button type="button"onclick="submitForm('form-wenda')" class="btn btn-primary" style="background-color: #008200; color: white;" >提交</button>
                                        <button class="btn btn-primary" type="reset">重置</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                    <!--------------------------------------------------------------------问答------------------------------------------------------------------------------->

                    <!--------------------------------------------------------------------穴位定位------------------------------------------------------------------------->
                    <div class="tab-pane" id="panel-2">
                        <form class="form-horizontal" id="form-acupoint-location">
                            <div class="col-md-9">
                                <!--试题分类-->
                                <div class="form-group">
                                    <label class="col-md-2 control-label">分类</label>
                                    <div class="col-md-9">
                                        <div class="rdo">
                                            <!--成人穴位-->
                                            <input type="radio" name="categoryId" class="rdolist" value="8"
                                                   checked="checked"/>
                                            <label class="rdobox" radio-exam-category-val="8">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">成人穴位</span>
                                            </label>
                                            <!--儿科穴位-->
                                            <input type="radio" name="categoryId" class="rdolist" value="7"/>
                                            <label class="rdobox" radio-exam-category-val="7">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">儿科穴位</span>
                                            </label>
                                        </div>
                                    </div>
                                </div>
                                <!--题干-->
                                <div class="form-group">
                                    <label class="col-md-2 control-label">题干</label>
                                    <div class="col-md-9 ">
                                        <input type="text" name="stem" class="form-control" parsley-trigger="change"
                                               required maxlength="250" data-parsley-maxlength="250" placeholder="请输入题干......"/>
                                    </div>
                                </div>
                                <!--知识点、总分-->
                                <div class="form-group">
                                    <label class="col-md-2 control-label ">知识点</label>
                                    <div class="col-md-4 ">
                                        <input type="text" class="form-control" name="knowledgePoint" parsley-trigger="change"
                                               required maxlength="250" data-parsley-maxlength="250" placeholder="请输入知识点......"/>
                                    </div>
                                    <label class="col-md-1 control-label">总分</label>
                                    <div class="col-md-4 ">
                                        <input type="text" name="totalScore" class="form-control" placeholder="总分自动计算"
                                               readonly id="total-score-acupoint-location"/>
                                    </div>
                                </div>
                                <!--大纲代码、认知层次-->
                                <div class="form-group">
                                    <label class="col-md-2 control-label">大纲代码</label>
                                    <div class="col-md-4 ">
                                        <input type="text" class="form-control" name="outlineCode" parsley-trigger="change"
                                               required maxlength="30" data-parsley-maxlength="30" placeholder="请输入大纲代码......"/>
                                    </div>

                                    <label class="col-md-1 control-label" style="padding-left: 0;">认知层次</label>
                                    <div class="col-md-4">
                                        <select name="cognitiveLevel" class="form-control" parsley-trigger="change"
                                                required id="cognitive-level-acupoint-location">
                                            <option value="">请选择</option>
                                        <#list cognitiveLevelList as listKey>
                                            <option value="${listKey.name}">${listKey.name}</option>
                                        </#list>
                                        </select>
                                    </div>
                                </div>
                                <!--穴位定位答案模板-->
                                <div id="answer-content-acupoint-location"></div>
                                <div class="form-group">
                                    <div class="col-md-6" style="text-align: center;">
                                        <button type="button" class="btn btn-primary" onclick="submitForm('form-acupoint-location')" style="background-color: #008200; color: white;">提交</button>
                                        <button class="btn btn-primary" type="reset">重置</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                    <!--------------------------------------------------------------------穴位定位------------------------------------------------------------------------->

                    <!--------------------------------------------------------------------单项手法------------------------------------------------------------------------->
                    <div class="tab-pane" id="panel-3">
                        <form class="form-horizontal" method="post" action="examinationSubmit" id="form-single-ploy">
                            <div class="col-md-9">
                                <!--试题分类-->
                                <div class="form-group">
                                    <label class="col-md-2 control-label">分类</label>
                                    <div class="col-md-9">
                                        <div class="rdo">
                                            <!--成人手法-->
                                            <input type="radio" name="categoryId" class="rdolist" value="10"
                                                   checked="checked"/>
                                            <label class="rdobox" radio-exam-category-val="10">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">成人手法</span>
                                            </label>
                                            <!--儿科手法-->
                                            <input type="radio" name="categoryId" class="rdolist" value="9"/>
                                            <label class="rdobox" radio-exam-category-val="9">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">儿科手法</span>
                                            </label>
                                            <!--触诊诊断-->
                                            <input type="radio" name="categoryId" class="rdolist" value="11"/>
                                            <label class="rdobox" radio-exam-category-val="11">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">触诊诊断</span>
                                            </label>
                                        </div>
                                    </div>
                                </div>
                                <!--五大类选择模板-->
                                <div class="form-group" id="single-ploy-five-category">
                                    <label class="col-md-2 control-label">手法类型</label>
                                    <div class="col-md-9">
                                        <div class="rdo" style="min-height: 65px;">
                                        <#list singlePloyFiveCategoryList as listKey>
                                            <input type="radio" name="singlePloyFiveCategoryId" class="rdolist"
                                                   value="${listKey.id}"/>
                                            <label class="rdobox" radio-single-ploy-five-category="${listKey.id}">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">${listKey.name}</span>
                                            </label>
                                        </#list>
                                            <!--其它-->
                                            <input type="radio" name="singlePloyFiveCategoryId" class="rdolist"
                                                   value="0" checked="checked"/>
                                            <label class="rdobox" radio-single-ploy-five-category="0">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">其它</span>
                                            </label>
                                        </div>
                                    </div>
                                </div>
                                <!--儿科手法子类-->
                                <div class="form-group" id="single-ploy-pediatric-subclass" style="display: none">
                                    <label class="col-md-2 control-label">手法类型</label>
                                    <div class="col-md-9">
                                        <div class="rdo">
                                        <#list singlePloyPediatricSubclassIdList as listKey>
                                            <input type="radio" name="examCategorySinglePloyPediatricSubclassId"
                                                   class="rdolist" value="${listKey.id}"/>
                                            <label class="rdobox">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">${listKey.name}</span>
                                            </label>
                                        </#list>
                                            <!--其它-->
                                            <input type="radio" name="examCategorySinglePloyPediatricSubclassId"
                                                   class="rdolist" value="0" checked="checked"/>
                                            <label class="rdobox">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">其它</span>
                                            </label>
                                        </div>
                                    </div>
                                </div>
                                <!--题干-->
                                <div class="form-group">
                                    <label class="col-md-2 control-label">题干</label>
                                    <div class="col-md-9 ">
                                        <input type="text" name="stem" class="form-control" parsley-trigger="change"
                                               required maxlength="250" data-parsley-maxlength="250"placeholder="请输入题干......"/>
                                    </div>
                                </div>
                                <!--知识点、总分-->
                                <div class="form-group">
                                    <label class="col-md-2 control-label">知识点</label>
                                    <div class="col-md-4 ">
                                        <input type="text" class="form-control" name="knowledgePoint"parsley-trigger="change"
                                               required maxlength="250" data-parsley-maxlength="250" placeholder="请输入知识点......"/>
                                    </div>
                                    <label class="col-md-1 control-label">总分</label>
                                    <div class="col-md-4 ">
                                        <input type="text" name="totalScore" class="form-control" placeholder="总分自动计算"
                                               readonly id="total-score-single-ploy-CEC"/>
                                    </div>
                                </div>
                                <!--大纲代码、认知层次-->
                                <div class="form-group">
                                    <label class="col-md-2 control-label">大纲代码</label>
                                    <div class="col-md-4 ">
                                        <input type="text" class="form-control" name="outlineCode" parsley-trigger="change"
                                               required maxlength="30" data-parsley-maxlength="30" placeholder="请输入大纲代码......"/>
                                    </div>

                                    <label class="col-md-1 control-label" style="padding-left: 0;">认知层次</label>
                                    <div class="col-md-4">
                                        <select name="cognitiveLevel"parsley-trigger="change" required class="form-control">
                                            <option value="">请选择</option>
                                        <#list cognitiveLevelList as listKey>
                                            <option value="${listKey.name}">${listKey.name}</option>
                                        </#list>
                                        </select>
                                    </div>
                                </div>
                                <!--问答题答案模板-->
                                <div id="answer-content-single-ploy"></div>
                                <div class="form-group">
                                    <div class="col-md-6" style="text-align: center;">
                                        <button type="button" class="btn btn-primary" onclick="submitForm('form-single-ploy')" style="background-color: #008200; color: white;">提交</button>
                                        <button class="btn btn-primary" type="reset">重置</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                    <!--------------------------------------------------------------------单项手法------------------------------------------------------------------------->

                    <!--------------------------------------------------------------------成套手法------------------------------------------------------------------------->
                    <div class="tab-pane" id="panel-4">
                        <form class="form-horizontal" method="post" action="examinationSubmit" id="form-complete-ploy">
                            <div class="col-md-9">
                                <!--试题分类-->
                                <div class="form-group">
                                    <label class="col-md-2 control-label">分类</label>
                                    <div class="col-md-9">
                                        <div class="rdo">
                                            <!--伤科-->
                                            <input type="radio" name="categoryId" class="rdolist" value="13"
                                                   checked="checked"/>
                                            <label class="rdobox" radio-exam-category-val="13">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">伤科</span>
                                            </label>
                                            <!--内科-->
                                            <input type="radio" name="categoryId" class="rdolist" value="12"/>
                                            <label class="rdobox" radio-exam-category-val="12">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">内科</span>
                                            </label>
                                            <!--妇科-->
                                            <input type="radio" name="categoryId" class="rdolist" value="14"/>
                                            <label class="rdobox" radio-exam-category-val="14">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">妇科</span>
                                            </label>
                                            <!--儿科-->
                                            <input type="radio" name="categoryId" class="rdolist" value="15"/>
                                            <label class="rdobox" radio-exam-category-val="15">
                                                <span class="check-image"></span>
                                                <span class="radiobox-content">儿科</span>
                                            </label>
                                        </div>
                                    </div>
                                </div>
                                <!--题干-->
                                <div class="form-group">
                                    <label class="col-md-2 control-label ">题干</label>
                                    <div class="col-md-9 ">
                                        <input type="text" name="stem" parsley-trigger="change" required maxlength="250" data-parsley-maxlength="250"class="form-control" placeholder="请输入题干......"/>
                                    </div>
                                </div>
                                <!--知识点、总分-->
                                <div class="form-group">
                                    <label class="col-md-2 control-label">知识点</label>
                                    <div class="col-md-4 ">
                                        <input type="text" class="form-control" name="knowledgePoint"parsley-trigger="change" required maxlength="250"
                                               data-parsley-maxlength="250"   placeholder="请输入知识点......"/>
                                    </div>
                                    <label class="col-md-1 control-label">总分</label>
                                    <div class="col-md-4 ">
                                        <input type="text" name="totalScore" class="form-control" placeholder="总分自动计算"
                                               readonly id="total-score-complete-ploy"/>
                                    </div>
                                </div>
                                <!--大纲代码、认知层次-->
                                <div class="form-group">
                                    <label class="col-md-2 control-label">大纲代码</label>
                                    <div class="col-md-4 ">
                                        <input type="text" class="form-control" name="outlineCode" parsley-trigger="change" required
                                               maxlength="30" data-parsley-maxlength="30"placeholder="请输入大纲代码......"/>
                                    </div>

                                    <label class="col-md-1 control-label" style="padding-left: 0;">认知层次</label>
                                    <div class="col-md-4">
                                        <select name="cognitiveLevel" class="form-control"parsley-trigger="change" required>
                                            <option value="">请选择</option>
                                        <#list cognitiveLevelList as listKey>
                                            <option value="${listKey.name}">${listKey.name}</option>
                                        </#list>
                                        </select>
                                    </div>
                                </div>
                                <!--问答题答案模板-->
                                <div id="answer-content-complete-ploy"></div>
                                <div class="form-group">
                                    <div class="col-md-6" style="text-align: center;">
                                        <button type="button" class="btn btn-primary" onclick="submitForm('form-complete-ploy')" style="background-color: #008200; color: white;">提交</button>
                                        <button class="btn btn-primary" type="reset">重置</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                    <!--------------------------------------------------------------------成套手法------------------------------------------------------------------------->

                </div>
            </div>
        </div>
    </div>
</div>


</body>

<!---------------------------------------------------------------------------------------------template模板区-------------------------------------------------------------------------------->
<!---------------------------------------------------问答题-腧穴答案模板----------------------------------------------->
<script id="answer-template-wenda-acupoint" type="text/html">
    <!--定位-->
    <div id="answer-content-wenda-location">
        <div class="form-group ">
            <label class="col-sm-2 control-label">定位</label>
            <div class="col-sm-6">
                <input type="text" class="form-control" name="answerWD" parsley-trigger="change" required
                       maxlength="250" data-parsley-maxlength="250" placeholder="请输入定位答案......"/>
            </div>
            <label class="col-sm-1 control-label">分值</label>
            <div class="col-sm-2 ">
                <input type="text" class="form-control" name="answerWDScore" parsley-trigger="change" required
                       data-parsley-range="[0,${examParamWendaAcupoint.maxLocationScore}]"/>
            </div>
            <div class="col-sm-1">
                <button class="btn  btn-primary" type="button"
                        onclick="addTerms('#answer-content-wenda-location',2,'定位项已达上限','wendaAcupointLocation')"><i
                        class="glyphicon glyphicon-plus"></i>&nbsp;添加
                </button>
            </div>
        </div>
    </div>
    <!--归经-->
    <div class="form-group ">
        <label class="col-sm-2 control-label">归经</label>
        <div class="col-sm-6 ">
            <input type="text" class="form-control" name="meridian" parsley-trigger="change" required maxlength="250"
                   data-parsley-maxlength="250" placeholder="请输入归经答案......"/>
        </div>
        <label class="col-sm-1 control-label">分值</label>
        <div class="col-sm-2 ">
            <input type="text" class="form-control" name="meridianScore" parsley-trigger="change" required
                   data-parsley-range="[0,${examParamWendaAcupoint.maxMeridianScore}]"/>
        </div>
    </div>
    <!--主治-->
    <div id="answer-content-wenda-mayor-cure">
        <div class="form-group ">
            <label class="col-sm-2 control-label">主治</label>
            <div class="col-sm-6 ">
                <input type="text" class="form-control" name="answerWD1" parsley-trigger="change" required
                       maxlength="250" data-parsley-maxlength="250" placeholder="请输入归经答案......"
                       placeholder="请输入主治答案......"/>
            </div>
            <label class="col-sm-1 control-label">分值</label>
            <div class="col-sm-2 ">
                <input type="text" class="form-control" name="answerWDScore1" parsley-trigger="change" required
                       data-parsley-range="[0,${examParamWendaAcupoint.maxMayorCureScore}]"/>
            </div>
            <div class="col-sm-1">
                <button class="btn  btn-primary" type="button"
                        onclick="addTerms('#answer-content-wenda-mayor-cure',7,'主治项已达上限','wendaAcupointMayorCure')"><i
                        class="glyphicon glyphicon-plus"></i>&nbsp;添加
                </button>
            </div>
        </div>
    </div>
</script>
<!-----------------------------------------------------------------问答题-内科、伤科、妇科、儿科、触诊-------------------------------------------------------->
<script id="answer-template-wenda-NSFEC" type="text/html">
    <div class="form-group "><label class="col-sm-2 control-label">答案</label>
        <div class="col-sm-6 ">
            <input type="text" class="form-control" name="answerWD2" parsley-trigger="change"
                   required maxlength="250" data-parsley-maxlength="250" placeholder="请输入答案......"/>
        </div>
        <label class="col-sm-1 control-label">分值</label>
        <div class="col-sm-2 ">
            <input type="text" class="form-control" name="answerWDScore2" parsley-trigger="change" required
                   data-parsley-range="[0,${examParamWendaFSENC.maxAnswerScore}]"/>
        </div>
        <div class="col-sm-1" id="commonAnswerListAddBtn">
            <button class="btn  btn-primary" type="button"
                    onclick="addTerms('#answer-content-wenda',9,'答案项已达上限','wendaNSFEC')">
                <i class="glyphicon glyphicon-plus"></i>&nbsp;添加
            </button>
        </div>
    </div>
</script>
<!-------------------------------------------------------------------穴位定位-成人穴位答案模板---------------------------------------------------------------------->
<script id="answer-template-acupoint-location-adult" type="text/html">
    <!--部位-->
    <div class="form-group ">
        <label class="col-sm-2 control-label">部位</label>
        <div class="col-sm-6">
            <select name="partIdAdult" class="form-control" parsley-trigger="change" required>
                <option value="">请选择</option>
            <#list partList as part>
                <option value="${part.id}">${part.part}</option>
            </#list>
            </select>
        </div>
        <label class="col-sm-1 control-label">分值</label>
        <div class="col-sm-2 ">
            <input type="text" class="form-control" name="partScoreAdult" parsley-trigger="change" required
                   data-parsley-range="[0,${examParamAcupointLocationAdult.maxPartScore}]"/>
        </div>
    </div>
    <!--归经-->
    <div class="form-group ">
        <label class="col-sm-2 control-label">归经</label>
        <div class="col-sm-6 ">
            <input type="text" class="form-control" name="meridianAdult" parsley-trigger="change"
                   required maxlength="250" data-parsley-maxlength="250" placeholder="请输入归经答案......"/>
        </div>
        <label class="col-sm-1 control-label">分值</label>
        <div class="col-sm-2 ">
            <input type="text" class="form-control" name="meridianScoreAdult" parsley-trigger="change" required
                   data-parsley-range="[0,${examParamAcupointLocationAdult.maxMeridianScore}]"/>
        </div>
    </div>
    <!--定位-->
    <div id="answer-content-acupoint-location-adult-location">
        <div class="form-group ">
            <label class="col-sm-2 control-label">定位</label>
            <div class="col-sm-6 ">
                <input type="text" class="form-control" name="answerXWDW" parsley-trigger="change"
                       required maxlength="250" data-parsley-maxlength="250" placeholder="请输入定位答案......"/>
            </div>
            <label class="col-sm-1 control-label">分值</label>
            <div class="col-sm-2 ">
                <input type="text" class="form-control" name="answerXWDWScore" parsley-trigger="change" required
                       data-parsley-range="[0,${examParamAcupointLocationAdult.maxLocationScore}]"/>
            </div>
            <div class="col-sm-1">
                <button class="btn  btn-primary" type="button"
                        onclick="addTerms('#answer-content-acupoint-location-adult-location',2,'定位项已达上限','acupointLocationAdultLocation')">
                    <i class="glyphicon glyphicon-plus"></i>&nbsp;添加
                </button>
            </div>
        </div>
    </div>
</script>
<!-----------------------------------------------------------------穴位定位-儿科穴位答案模板------------------------------------------------------------------------>
<script id="answer-template-acupoint-location-pediatric" type="text/html">
    <!--部位-->
    <div class="form-group ">
        <label class="col-sm-2 control-label">部位</label>
        <div class="col-sm-6">
            <select name="partIdPediatric" class="form-control" parsley-trigger="change" required>
                <option value="">请选择</option>
            <#list partList as part>
                <option value="${part.id}">${part.part}</option>
            </#list>
            </select>
        </div>
        <label class="col-sm-1 control-label">分值</label>
        <div class="col-sm-2 ">
            <input type="text" class="form-control" name="partScorePediatric" parsley-trigger="change" required
                   data-parsley-range="[0,${examParamAcupointLocationPediatric.maxPartScore}]"/>
        </div>
    </div>
    <!--具体部位-->
    <div class="form-group ">
        <label class="col-sm-2 control-label">具体部位</label>
        <div class="col-sm-6 ">
            <input type="text" class="form-control" name="partDetailPediatric" parsley-trigger="change"
                   required maxlength="250" data-parsley-maxlength="250" placeholder="请输入具体部位答案......"/>
        </div>
        <label class="col-sm-1 control-label">分值</label>
        <div class="col-sm-2 ">
            <input type="text" class="form-control" name="partDetailScorePediatric" parsley-trigger="change" required
                   data-parsley-range="[0,${examParamAcupointLocationPediatric.maxPartDetailScore}]"/>
        </div>
    </div>
    <!--定位-->
    <div id="answer-content-acupoint-location-pediatric-location">
        <div class="form-group ">
            <label class="col-sm-2 control-label">定位</label>
            <div class="col-sm-6 ">
                <input type="text" class="form-control" name="answerXWDW1" parsley-trigger="change"
                       required maxlength="250" data-parsley-maxlength="250" placeholder="请输入定位答案......"/>
            </div>
            <label class="col-sm-1 control-label">分值</label>
            <div class="col-sm-2 ">
                <input type="text" class="form-control" name="answerXWDWScore1" parsley-trigger="change" required
                       data-parsley-range="[0,${examParamAcupointLocationPediatric.maxLocationScore}]"/>
            </div>
            <div class="col-sm-1">
                <button class="btn  btn-primary" type="button"
                        onclick="addTerms('#answer-content-acupoint-location-pediatric-location',2,'定位项已达上限','acupointLocationPediatricLocation')">
                    <i class="glyphicon glyphicon-plus"></i>&nbsp;添加
                </button>
            </div>
        </div>
    </div>
</script>
<!----------------------------------------------------------单项手法-儿科手法、成人手法、触诊诊断答案模板------------------------------------------------->
<script id="answer-template-single-ploy-CEC" type="text/html">
    <div class="form-group "><label class="col-sm-2 control-label">答案</label>
        <div class="col-sm-6 ">
            <input type="text" class="form-control" name="answerDXSF"parsley-trigger="change"
                   required maxlength="250" data-parsley-maxlength="250" placeholder="请输入答案......"/>
        </div>
        <label class="col-sm-1 control-label">分值</label>
        <div class="col-sm-2 ">
            <input type="text" class="form-control" name="answerDXSFScore"parsley-trigger="change" required
                   data-parsley-range="[0,${examParamSinglePloyCEC.maxAnswerScore}]"/>
        </div>
        <div class="col-sm-1">
            <button class="btn  btn-primary" type="button"
                    onclick="addTerms('#answer-content-single-ploy',9,'答案项已达上限','singlePloyCEC')">
                <i class="glyphicon glyphicon-plus"></i>&nbsp;添加
            </button>
        </div>
    </div>
</script>
<!-----------------------------------------------------------------------成套手法-妇、伤、儿、内科------------------------------------------------------------------>
<script id="answer-template-complete-ploy-FSEN" type="text/html">
    <div class="form-group "><label class="col-sm-2 control-label">答案</label>
        <div class="col-sm-6 ">
            <input type="text" class="form-control" name="answerCTSF"parsley-trigger="change" required maxlength="250"
                   data-parsley-maxlength="250"placeholder="请输入答案......"/>
        </div>
        <label class="col-sm-1 control-label">分值</label>
        <div class="col-sm-2 ">
            <input type="text" class="form-control" name="answerCTSFScore"parsley-trigger="change" required
                   data-parsley-range="[0,${examParamCompletePloyFSEN.maxAnswerScore}]"/>
        </div>
        <div class="col-sm-1">
            <button class="btn  btn-primary" type="button"
                    onclick="addTerms('#answer-content-complete-ploy',29,'答案项已达上限','completePloyFSEN')">
                <i class="glyphicon glyphicon-plus"></i>&nbsp;添加
            </button>
        </div>
    </div>
</script>
<script>
    var data = {};
    var answerTemplateWendaAcupoint = template('answer-template-wenda-acupoint', data);
    var answerTemplateWendaNSFEC = template('answer-template-wenda-NSFEC', data);
    var answerTemplateAcupointLocationAldult = template('answer-template-acupoint-location-adult', data);
    var answerTemplateAcupointLocationPediatric = template('answer-template-acupoint-location-pediatric', data);
    var answerTemplateSinglePloyCEC = template('answer-template-single-ploy-CEC', data);
    var answerTemplateCompletePloyFSEN = template('answer-template-complete-ploy-FSEN', data);
    /*********************************第一次加载模板*******************************************************************/
    document.getElementById('answer-content-wenda').innerHTML = answerTemplateWendaAcupoint;
    document.getElementById('answer-content-acupoint-location').innerHTML = answerTemplateAcupointLocationAldult;
    document.getElementById('answer-content-single-ploy').innerHTML = answerTemplateSinglePloyCEC;
    document.getElementById('answer-content-complete-ploy').innerHTML = answerTemplateCompletePloyFSEN;
    /*********************************第一次加载模板*******************************************************************/
    /*********************************分类改变时改变模板*******************************************************************/
    //问答题
    $(document).ready(function () {
        var a = $('input:radio:checked').val();
        $(document).ready(function () {
            //参数{input类名，选择类型(单选or多选)}
            $(".rdolist").labelauty("rdolist", "rdo");
        });
        $(".rdobox").click(function () {
            var category = $(this).attr("radio-exam-category-val");
            if (category == '1') {
                document.getElementById('answer-content-wenda').innerHTML = answerTemplateWendaAcupoint;
            } else if (category == '2' || category == '4' || category == '3' || category == '5' || category == '6') {
                document.getElementById('answer-content-wenda').innerHTML = answerTemplateWendaNSFEC;
            } else if (category == '8') {
                document.getElementById('answer-content-acupoint-location').innerHTML = answerTemplateAcupointLocationAldult;
            } else if (category == '7') {
                document.getElementById('answer-content-acupoint-location').innerHTML = answerTemplateAcupointLocationPediatric;
            } else if (category == '10') {
                $("#single-ploy-five-category").show();
                $("#single-ploy-pediatric-subclass").hide();
                document.getElementById('answer-content-single-ploy').innerHTML = answerTemplateSinglePloyCEC;
            } else if (category == '9') {
                $("#single-ploy-pediatric-subclass").show();
                $("#single-ploy-five-category").hide();
                document.getElementById('answer-content-single-ploy').innerHTML = answerTemplateSinglePloyCEC;
            } else if (category == '11') {
                $("#single-ploy-pediatric-subclass").hide();
                $("#single-ploy-five-category").hide();
                document.getElementById('answer-content-single-ploy').innerHTML = answerTemplateSinglePloyCEC;
            } else if (category == '14' || category == '15' || category == '13' || category == '12') {
                document.getElementById('answer-content-complete-ploy').innerHTML = answerTemplateCompletePloyFSEN;
            }
        });
    });
    /*********************************分类改变时改变模板*******************************************************************/


</script>
<!----------------------------------------------------------------------------------------template模板区-------------------------------------------------------------------------------------->


<!----------------------------------------------------------提交且验证------------------------------------------------------------------------->
<script type="text/javascript">
    var maxLocationScoreWD = "${examParamWendaAcupoint.maxLocationScore!""}";
    var maxMayorCureScoreWD = "${examParamWendaAcupoint.maxMayorCureScore!""}";
    var maxAnswerScoreWD = "${examParamWendaFSENC.maxAnswerScore!""}";
    var maxLocationScoreXWDWAdult = "${examParamAcupointLocationAdult.maxLocationScore!""}";
    var maxLocationScoreXWDWPediatric = "${examParamAcupointLocationPediatric.maxLocationScore!""}";
    var maxAnswerScoreDXSF = "${examParamSinglePloyCEC.maxAnswerScore!""}";
    var maxAnswerScoreCTSF = "${examParamCompletePloyFSEN.maxAnswerScore!""}";

    function submitForm(formId) {
        if (formId == "form-wenda") {

            if (!$('#form-wenda').parsley().validate()) {
                return;
            } else {
                debugger
                var lock = false;
                var category = $("#form-wenda").find(".checked").attr("radio-exam-category-val");
                if (category == 1) { //问答题-腧穴提交
                    var totalScore = getTotalScoreWendaAcupoint();
                    $("#total-score-wenda").val(totalScore)
                    if (totalScore > '${examParamWendaAcupoint.maxTotalScore}') {
                        layer.alert('总分不得大于【${examParamWendaAcupoint.maxTotalScore}分】，请修改!', {
                            closeBtn: 0
                        });
                        return;
                    }
                    if (!lock) {
                        lock = true;
                        $.post('${ctx}/exam/examAdd/1', $("#form-wenda").serialize(), function (data) {
                            lock = false;
                            if (data.code == 0) {
                                debugger
                                layer.msg(data.msg, {
                                    icon: 1,
                                    time: 4000
                                });
                                return false;
                            } else {
                                layer.alert(data.msg, {
                                    closeBtn: 0
                                });
                                return false;
                            }
                        }, "json");
                    }
                } else if (category == 2 || category == 3 || category == 4 || category == 5 || category == 6) { //问答题-内科、伤科、妇科、儿科、触诊
                    var totalScore = getTotalScoreWendaNSFEC();
                    $("#total-score-wenda").val(totalScore)
                    if (totalScore > '${examParamWendaFSENC.maxTotalScore}') {
                        layer.alert('总分不得大于【${examParamWendaFSENC.maxTotalScore}分】，请修改!', {
                            closeBtn: 0
                        });
                        return;
                    }
                    if (!lock) {
                        lock = true;
                        $.post('${ctx}/exam/examAdd/23456', $("#form-wenda").serialize(), function (data) {
                            lock = false;
                            if (data.code == 0) {
                                layer.msg(data.msg, {
                                    icon: 1,
                                    time: 3000
                                });
                                return false;
                            } else {
                                layer.alert(data.msg, {
                                    closeBtn: 0
                                });
                                return false;
                            }
                        }, "json");
                    }
                }
            }
        } else if (formId == "form-acupoint-location") {

            if (!$('#form-acupoint-location').parsley().validate()) {
                return;
            } else {
                var lock = false;
                var category = $("#form-acupoint-location").find(".checked").attr("radio-exam-category-val");
                if (category == 8) { //穴位定位-成人穴位
                    var totalScore = getTotalScoreAcupointLocationAdult();
                    $("#total-score-acupoint-location").val(totalScore)
                    if (totalScore > '${examParamAcupointLocationAdult.maxTotalScore}') {
                        layer.alert('总分不得大于【${examParamAcupointLocationAdult.maxTotalScore}分】，请修改!', {
                            closeBtn: 0
                        });
                        return;
                    }
                    if (!lock) {
                        lock = true;
                        $.post('${ctx}/exam/examAdd/8', $("#form-acupoint-location").serialize(), function (data) {
                            lock = false;
                            if (data.code == 0) {
                                layer.msg(data.msg, {
                                    icon: 1,
                                    time: 3000
                                });
                                return false;
                            } else {
                                layer.alert(data.msg, {
                                    closeBtn: 0
                                });
                                return false;
                            }
                        }, "json");
                    }
                } else if (category == 7) {
                    //穴位定位-儿科穴位
                    var totalScore = getTotalScoreAcupointLocationPediatric();
                    $("#total-score-acupoint-location").val(totalScore)
                    if (totalScore > '${examParamAcupointLocationPediatric.maxTotalScore}') {
                        layer.alert('总分不得大于【${examParamAcupointLocationPediatric.maxTotalScore}分】，请修改!', {
                            closeBtn: 0
                        });
                        return;
                    }
                    if (!lock) {
                        lock = true;
                        $.post('${ctx}/exam/examAdd/7', $("#form-acupoint-location").serialize(), function (data) {
                            lock = false;
                            if (data.code == 0) {
                                layer.msg(data.msg, {
                                    icon: 1,
                                    time: 3000
                                });
                                return false;
                            } else {
                                layer.alert(data.msg, {
                                    closeBtn: 0
                                });
                                return false;
                            }
                        }, "json");
                    }
                }
            }
        } else if (formId == "form-single-ploy") {
            if (!$('#form-single-ploy').parsley().validate()) {
                return;
            } else {
                var lock = false;
                var totalScore = getTotalScoreSinglePloyCEC();
                $("#total-score-single-ploy-CEC").val(totalScore)
                if (totalScore > '${examParamSinglePloyCEC.maxTotalScore}') {
                    layer.alert('总分不得大于【${examParamSinglePloyCEC.maxTotalScore}分】，请修改!', {
                        closeBtn: 0
                    });
                    return;
                }
                if (!lock) {
                    lock = true;
                    $.post('${ctx}/exam/examAdd/9-10-11', $("#form-single-ploy").serialize(), function (data) {
                        lock = false;
                        if (data.code == 0) {
                            layer.msg(data.msg, {
                                icon: 1,
                                time: 3000
                            });
                            return false;
                        } else {
                            layer.alert(data.msg, {
                                closeBtn: 0
                            });
                            return false;
                        }
                    }, "json");
                }
            }
        } else if (formId == "form-complete-ploy") {
            if (!$('#form-complete-ploy').parsley().validate()) {
                return;
            } else {
                var lock = false;
                var totalScore = getTotalScoreCompletePloyFSEN();
                $("#total-score-complete-ploy").val(totalScore)
                if (totalScore > '${examParamCompletePloyFSEN.maxTotalScore}') {
                    layer.alert('总分不得大于【${examParamCompletePloyFSEN.maxTotalScore}分】，请修改!', {
                        closeBtn: 0
                    });
                    return;
                }
                if (!lock) {
                    lock = true;
                    $.post('${ctx}/exam/examAdd/12-13-14-15', $("#form-complete-ploy").serialize(), function (data) {
                        lock = false;
                        if (data.code == 0) {
                            layer.msg(data.msg, {
                                icon: 1,
                                time: 3000
                            });
                            return false;
                        } else {
                            layer.alert(data.msg, {
                                closeBtn: 0
                            });
                            return false;
                        }
                    }, "json");
                }
            }
        }
    }

</script>
<!----------------------------------------------------------提交且验证------------------------------------------------------------------------->
<script type="text/javascript">
    /***************************************获取总分****************************************/
    /*问答题-腧穴*/
    function getTotalScoreWendaAcupoint() {
        var total = 0.0;
        var meridianScore = $("#form-wenda").find("input[name='meridianScore']").val();

        total = parseFloat(total) + parseFloat(meridianScore);
        $("input[name='answerWDScore']").each(function (i) {
            total = parseFloat($(this).val()) + total;
        });

        $("input[name='answerWDScore1']").each(function (i) {
            total = parseFloat($(this).val()) + total;
        });

        return total;
    }

    /*问答题-妇、伤、内、儿、触诊*/
    function getTotalScoreWendaNSFEC() {

        var total = 0.0;
        $("input[name='answerWDScore2']").each(function (i) {
            total = parseFloat($(this).val()) + total;
        });

        return total;
    }

    /*穴位定位-成人穴位*/
    function getTotalScoreAcupointLocationAdult() {
        var partScoreAdult = $("#form-acupoint-location").find("input[name='partScoreAdult']").val();
        var meridianScoreAdult = $("#form-acupoint-location").find("input[name='meridianScoreAdult']").val();

        var total = 0.0;
        $("input[name='answerXWDWScore']").each(function (i) {
            total = parseFloat($(this).val()) + total;
        });
        total = total + parseFloat(partScoreAdult) + parseFloat(meridianScoreAdult);
        return total;
    }

    /*穴位定位-儿科穴位*/
    function getTotalScoreAcupointLocationPediatric() {
        var partScorePediatric = $("#form-acupoint-location").find("input[name='partScorePediatric']").val();
        var partDetailScorePediatric = $("#form-acupoint-location").find("input[name='partDetailScorePediatric']").val();
        var total = 0.0;
        $("input[name='answerXWDWScore1']").each(function (i) {
            total = parseFloat($(this).val()) + total;
        });
        total = parseFloat(total) + parseFloat(partScorePediatric) + parseFloat(partDetailScorePediatric);
        return total;
    }

    /*单项手法-儿科手法、成人手法、触诊诊断*/
    function getTotalScoreSinglePloyCEC() {
        var total = 0.0;
        $("input[name='answerDXSFScore']").each(function (i) {
            total = parseFloat($(this).val()) + total;
        });
        alert(total)
        return total;
    }

    /*成套手法-妇、伤、儿、内科*/
    function getTotalScoreCompletePloyFSEN() {
        var total = 0.0;
        $("input[name='answerCTSFScore']").each(function (i) {
            total = parseFloat($(this).val()) + total;
        });
        return total;
    }

    /***************************************获取总分****************************************/
</script>
</html>
